package com.example.customviewtest;

import androidx.appcompat.app.AppCompatActivity;

import android.content.BroadcastReceiver;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.customviewtest.api.APIActivity;
import com.example.customviewtest.bilbil.BActivity;
import com.example.customviewtest.clipImage.ShowImageActivity;
import com.example.customviewtest.my_edittext.EditTextActivity;
import com.example.customviewtest.my_recyclerview.RecyclerActivity;
import com.example.customviewtest.prize_game.PrizeActivity;
import com.example.customviewtest.rotate360.Rotate360Activity;
import com.example.customviewtest.vertical_viewpager.VerticalViewPagerActivity;
import com.example.customviewtest.view.PaintActivity;
import com.example.customviewtest.wymusic.WYMusicActivity;
import com.example.customviewtest.xiangxue.XiangXueActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.btn_paint).setOnClickListener(this);
        findViewById(R.id.btn_rotate360).setOnClickListener(this);
        findViewById(R.id.btn_clip_img).setOnClickListener(this);
        findViewById(R.id.btn_wy_music).setOnClickListener(this);
        findViewById(R.id.btn_prize).setOnClickListener(this);
        findViewById(R.id.btn_b).setOnClickListener(this);
        findViewById(R.id.btn_viewpager).setOnClickListener(this);
        findViewById(R.id.btn_api).setOnClickListener(this);
        findViewById(R.id.btn_recycler).setOnClickListener(this);
        findViewById(R.id.btn_et).setOnClickListener(this);
        findViewById(R.id.btn_xx).setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_paint:
                startActivity(new Intent(MainActivity.this, PaintActivity.class));
                break;
            case R.id.btn_rotate360:
                startActivity(new Intent(MainActivity.this, Rotate360Activity.class));
                break;
            case R.id.btn_clip_img:
                startActivity(new Intent(MainActivity.this, ShowImageActivity.class));
                break;
            case R.id.btn_wy_music:
                startActivity(new Intent(MainActivity.this, WYMusicActivity.class));
                break;
            case R.id.btn_prize:
                startActivity(new Intent(MainActivity.this, PrizeActivity.class));
                break;
            case R.id.btn_b:
                startActivity(new Intent(MainActivity.this, BActivity.class));
                break;
            case R.id.btn_viewpager:
                startActivity(new Intent(MainActivity.this, VerticalViewPagerActivity.class));

                break;
            case R.id.btn_api:
                startActivity(new Intent(MainActivity.this, APIActivity.class));

                break;
            case R.id.btn_recycler:
                startActivity(new Intent(MainActivity.this, RecyclerActivity.class));

                break;
            case R.id.btn_et:
                startActivity(new Intent(MainActivity.this, EditTextActivity.class));

                break;
            case R.id.btn_xx:
                startActivity(new Intent(MainActivity.this, XiangXueActivity.class));
                break;
        }
    }
}
